package com.guodexian.service;
import com.guodexian.dto.UserDto;
import com.guodexian.entity.User;
import com.guodexian.ex.PassException;
import com.guodexian.ex.TelException;
import org.springframework.transaction.annotation.Transactional;
/**
 * 类说明：<br>
 *
 * @author qfrx<br>
 * 2024/12/24 16:31<br>
 * @since 1.0 <br>
 */

@Transactional
public interface UserService {
    /**
     *  根据电话查找用户
     * @param userTel 用户名
     * @param userPass 密码
     * @return 查找到用户对象
     * @throws PassException 密码异常
     * @throws TelException 账户异常
     */
    @Transactional(readOnly = true,rollbackFor = {TelException.class, PassException.class})
    User  findUserByTelAndPass(String userTel, String userPass)throws PassException, TelException;


    void reg(User user);
}
